/**************************
* @Summary
* @Author 20009200303 赵传博
* @Date 2022/5/22
*****************************/

#ifndef EX5_COMPLEX_H
#define EX5_COMPLEX_H

#include <iostream>
using std::cout;
using std::endl;
using std::ostream;

class Complex {
private:
    double real;            // 实部
    double imagine;         // 虚部
public:
    Complex() = default;
    Complex(double re = 0, double im = 0);
    Complex(const Complex& c): real(c.real), imagine(c.imagine){}
    inline Complex& operator+=(const Complex& other);
    inline Complex& operator-=(const Complex& other);
    Complex& operator-();
    friend ostream& operator<<(ostream& os, Complex& c);
};

Complex operator+(Complex, Complex);
Complex operator-(Complex&, const Complex&);


#endif //EX5_COMPLEX_H
